﻿CREATE TABLE [dbo].[LeaseOrder]
(
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RowId] [uniqueidentifier] ROWGUIDCOL DEFAULT (NEWID()) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedDate] [datetime] NOT NULL,
	[ModifiedByUserId] [int] NULL,
	[Version] [timestamp] NOT NULL,
	[LeaseAgreementId] [int] NOT NULL,
	[OrderNumber] [varchar](32) NOT NULL,
	[ReducedUnitPricePerMonth] [numeric](12,2) NOT NULL,
	[ReducedTotalPricePerMonth] [numeric](12,2) NOT NULL,
	[LeaseMonths] [smallint] NOT NULL,
	[LeasePaymentTypeId] [int] NOT NULL,
	[TotalAmount] [numeric](12,2) NOT NULL,
	[DepositAmount] [numeric](12,2) NOT NULL,
	[LeaseAmount] [numeric](12,2) NOT NULL,
	[GuarantyAmount] [numeric](12,2) NOT NULL,
	[OtherAmount] [numeric](12,2) NOT NULL,
	[EngagedContractDate] [datetime] NOT NULL,
	[SignatureDate] [datetime] NOT NULL,
	[Comment] [nvarchar](512) NULL,
)